﻿@using Microsoft.AspNet.Identity;
@using HOPU.Models
@if (Request.IsAuthenticated)
{
    <ul class="nav nav-pills ml-auto">
        <li class="nav-item ml-auto">
            @Html.ActionLink("你好，" + GetRealUserName.GetRealName(User.Identity.GetUserId()) + " !", "index", "Manage", null, new { @class = "nav-link ml-auto" })
            @*GetRealUserName.GetRealName(User.Identity.GetUserId())*@
        </li>
        @if (GetUserType.GetUserTypeInfo(User.Identity.GetUserId()))//如果是admin
        {
            <li class="nav-item ml-auto">
                @Html.ActionLink("后台管理", "SysManageIndex", "SysManage", null, new { @class = "nav-link" })
            </li>
        }
        @using (Html.BeginForm("LogOff", "SysAdmin", FormMethod.Post, new { id = "logoutForm" }))
        {
            @Html.AntiForgeryToken()
            <li class="nav-item ml-auto">
                <a href="javascript:document.getElementById('logoutForm').submit()" class="nav-link ml-auto ">注销</a>
            </li>
        }
    </ul>
}
else
{
    <ul class="navbar-nav ml-auto">
        <li class="nav-item ">@Html.ActionLink("注册", "AdminRegister", "SysAdmin", new { @class = " btn btn-outline-success " })</li>
        <div class="ml-2"></div>
        <li class="nav-item">@Html.ActionLink("登录", "AdminLogin", "SysAdmin", new { @class = "btn btn-outline-success " })</li>
    </ul>
}
